package com.cxy.web;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


import com.cxy.pojo.User;
import com.cxy.services.UserServices;

public class UserAction extends BaseAction {
	private static final long serialVersionUID = -3492229765925496831L;
	public static final String CENTER = "center";
	@Resource
	private UserServices userServices;
	private List<User> userList;
	private User user;
	private int id;
	public String execute(){
		userList = userServices.find();
		return SUCCESS;		
	}
	@Override
	public String add() {
		return null;
	}

	@Override
	public String get() {
		user = userServices.get(id);
		return CENTER;
	}
	@Override
	public String update() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public String del() {
		return null;
	}

	@Override
	public String input() {
		return null;
	}

	@Override
	public String list() {
		return null;
	}

	public void setServletRequest(HttpServletRequest request) {
		
	}
	public List<User> getUserList() {
		return userList;
	}
	public void setUserList(List<User> userList) {
		this.userList = userList;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

}
